@extends('admin.admin')

@section('content')
<link rel="stylesheet" href="{{ asset('/js/bootstrap-switch/css/bootstrap-switch.min.css') }}">
<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        群发短信管理
        <small>群发短信</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="/admin"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li ><a href="/admin/coupon">优惠券管理</a></li>
        <li class="active">群发短信</li>
    </ol>
</section>



<!-- Main content -->
<section class="content">


    <div class="row">
        <div class="col-xs-12">
            <div class="box box-primary">

                <div class="box-header with-border">
                    <h3 class="box-title">群发短信</h3>
                    <div class="box-tools">
                    </div>
                </div>
                <!-- /.box-header -->
                {!! Form::model($commands,['route'=>['admin.coupon.massMessage'],'method'=>'put'])  !!}

                <div class="box-body">
                   <div class="form-group">
                       <div class="box-body table-responsive no-padding">
                            <label for="exampleInputPassword1">选择口令</label>
                            <label id="J-checkAll" class="checkbox-inline">
                                {!! Form::checkbox('',false,0,array('class'=>'minimal')) !!}
                                <span style="vertical-align: bottom">&nbsp;全选</span>
                            </label>
                        </div>
                        <table class="table table-hover">
                            <tr>
                                <th class="text-center" style="width: 60px">选择</th>
                                <th style="width: 120px">优惠券ID</th>
                                <th>优惠券名称</th>
                                <th style="width: 120px">优惠券面值</th>
                                <th>开始时间</th>
                                <th>结束时间</th>
                            </tr>
                             @foreach ($commands as $k=>$command)
                             <tr>
                             <td class="text-center">{!! Form::checkbox('select_command['.$k.']', $command['id'], false,['id'=>$command['id']]) !!}</td>
                             <td>{{$command['id']}}</td>
                             <td>{{$command['name']}}</td>
                             <td>{{$command['value']}}</td>
                             <td>{{$command['start_time']}}</td>
                             <td>{{$command['end_time']}}</td>
                             </tr>
                             @endforeach
                        </table>

                   </div>
                   <div class="form-group">
                        <div class="box-body table-responsive no-padding">
                            <label for="exampleInputPassword1">选择用户</label>
                            <label id="s-checkAll" class="checkbox-inline">
                                {!! Form::checkbox('select_user','3',0,array('class'=>'minimal')) !!}
                                <span style="vertical-align: bottom">&nbsp;全选</span>
                            </label>
                        </div>
                        <table class="table table-hover">
                            <tr>
                                <td class="J-p">
                                    <label class="checkbox-inline">
                                        {!! Form::checkbox('select_user','1',0,array('class'=>'minimal')) !!}
                                        <span style="vertical-align: bottom">&nbsp;近三个月登录</span>
                                    </label>
                                </td>
                            </tr>
                            <tr>
                                <td class="J-p">
                                    <label class="checkbox-inline">
                                        {!! Form::checkbox('select_user','2',0,array('class'=>'minimal')) !!}
                                        <span style="vertical-align: bottom">&nbsp;邮箱认证</span>
                                    </label>
                                </td>
                            </tr>

                        </table>
                   </div>　
                   <!-- /.box-body -->

                   <div class="box-footer">
                       <button type="submit" class="btn btn-primary">发送</button>
                   </div>

                </div>

                {!! Form::close()  !!}

            </div>
            <!-- /.box -->

        </div>
    </div>


<!-- Modal -->

</section>
<!-- /.content -->
<!-- Select2 -->

@endsection